package com.hand.wyc24548.service.serviceImpl;

import com.hand.wyc24548.dao.SsmItemMapper;
import com.hand.wyc24548.entity.SsmItem;
import com.hand.wyc24548.service.SsmltemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("ssmItemService")
public class SsmltemServiceImpl implements SsmltemService {
    @Autowired
    private SsmItemMapper ssmItemMapper;

    /**
     * 查看所有信息
     */
    @Override
    public List<SsmItem> selectAll() {
        return ssmItemMapper.selectAll();
    }

    /**
     * 根据id查看信息
     * @param itemId
     * @return
     */
    @Override
    public SsmItem selectByPrimaryKey(Long itemId) {
        return ssmItemMapper.selectByPrimaryKey(itemId);
    }

    @Override
    public int updateByPrimaryKeySelective(SsmItem record) {

        return ssmItemMapper.updateByPrimaryKeySelective(record);
    }

    /**
     * 修改
     * @param record
     * @return
     */
/*    @Override
    public int updateByPrimaryKey(SsmItem record) {
        return ssmItemMapper.updateByPrimaryKey(record);
    }*/

    /**
     * 删除
     * @param itemId
     * @return
     */
    @Override
    public int deleteByPrimaryKey(Long itemId) {
        return ssmItemMapper.deleteByPrimaryKey(itemId);
    }

    /**
     * 添加数据
     * @param record
     * @return
     */
    @Override
    public int insert(SsmItem record) {
        return ssmItemMapper.insert(record);
    }
}
